package com.yxq.mdt.app.modules.search.ui;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yxq.mdt.app.R;
import com.yxq.mdt.app.glide.GlideHelper;
import com.yxq.mdt.app.modules.search.bean.SearchGroupBean;

import java.util.List;

/**
 * @author L
 * @time 2019-10-21
 * @describe 搜索-圈子列表
 */
public class SearchGroupListAdapter extends BaseQuickAdapter<SearchGroupBean.ListBean, BaseViewHolder> {

    public SearchGroupListAdapter(int layoutResId, @Nullable List<SearchGroupBean.ListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, SearchGroupBean.ListBean item) {

        helper.setText(R.id.item_search_user_tv_name, item.getGroupname());
        helper.setText(R.id.item_search_user_tv_intro, item.getMenberNum() + "人");

        GlideHelper.setLoadRoundImage(mContext, item.getLogo(), R.color.gray, helper.getView(R.id.item_search_user_iv_avatar));
    }

}
